import { type } from "@testing-library/user-event/dist/type"

//定义请求参数的类型,都是可选参数
export interface hospitalListSearchParamsType {
    hoscode?: string,
    hosname?: string,
    hostype?: string,
    provinceCode?: string,
    cityCode?: string,
    districtCode?: string,
    status?: 0 | 1
}

//提出的医院详情返回值的bookingRule
export interface bookingRuleType {
    cycle: number,
    releaseTime: string,
    stopTime: string,
    quitDay: number,
    quitTime: string,
    rule: string[]
}


//定义医院返回数据中content的类型
//这个和医院详情返回是一样的，多个null，bookingRuleType可以用联合类型
export interface hospitalListItemsType {
    id: string,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: {
        hostypeString: string,
        fullAddress: string
    },
    hoscode: string,
    hosname: string,
    hostype: string,
    provinceCode: string,
    cityCode: string,
    districtCode: string,
    address: string,
    logoData: string,
    intro: string,
    route: string,
    status: 0 | 1,
    bookingRule: bookingRuleType | null
}

export interface hospitalDetailReturnType {
    "bookingRule"?: bookingRuleType,
    "hospital"?: hospitalListItemsType
  }

//请求医院列表的返回值中content的数组类型
export type hospitalListContentType = hospitalListItemsType[];

//定义请求返回值的类型
export interface hospitalListReturnType {
    content: hospitalListContentType,
    pageable: {
        sort: {
            sorted: boolean,
            unsorted: boolean,
            empty: boolean
        },
        pageNumber: number,
        pageSize: number,
        offset: number,
        paged: boolean,
        unpaged: boolean
    },
    totalElements: number,
    totalPages: number,
    last: boolean,
    first: boolean,
    sort: {
        sorted: boolean,
        unsorted: boolean,
        empty: boolean
    },
    numberOfElements: number,
    size: number,
    number: number,
    empty: boolean
}



//4、添加省市县三级联动的类型
export interface getProvinceItemType{
    id: number,
    createTime: string,
    updateTime: string,
    isDeleted: number,
    param: Object,
    parentId: number,
    name:string,
    value: string,
    dictCode: null,
    hasChildren: boolean
}

export type getProvinceReturnType = getProvinceItemType[]


//4. 医院排班科室的返回值类型
export interface hosDepartmentType {
    depcode: string,
    depname: string,
    children: hosDepartmentType | null
  }
  
  export type hosDepartmentReturnType = hosDepartmentType[]; 


//5、医院排班规则的类行定义
//   01-定义请求参数类型
export interface hosScheduleParamType {
    page:number,
    limit:number,
    hoscode:string,
    depcode:string
}

//02-定义bookingScheduleList类型
export interface bookingScheduleListItemType{
        workDate: string,
        workDateMd: boolean,
        dayOfWeek: string,
        docCount: number,
        reservedNumber: number,
        availableNumber: number,
        status: boolean,
}

export type bookingScheduleList =bookingScheduleListItemType[]

export interface hosScheduleReturnType {
    total: number,
    bookingScheduleList: bookingScheduleList
    baseMap: {
    hosname: string
    }
}

//定义医生排班请求参数的类型
export interface getDoctorSchedulParamType{
    hoscode:string,
    depcode:string,
    workDate:string
}

//定义医生排班返回数组的每一项数据 
export interface getDoctorSchedulItemType{
    id: string;
  createTime: string;
  updateTime: string;
  isDeleted: number;
  param: {
    dayOfWeek: string;
    depname: string;
    hosname: string;
  };
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: 0 | 1;
  hosScheduleId: string;
}

// 定义定义医生排班返回数组的数据类型
export type getDoctorSchedulReturnType = getDoctorSchedulItemType[]





// const b ={
//     "total": 37,
//     "bookingScheduleList": [
//       {
//         "workDate": "2022-04-28",
//         "workDateMd": null,
//         "dayOfWeek": "周四",
//         "docCount": 3,
//         "reservedNumber": 100,
//         "availableNumber": 38,
//         "status": null
//       }
//     ],
//     "baseMap": {
//     "hosname": "北京协和医院"
//     }
  

//获取医院详情返回的数据
// const a ={
//     "bookingRule": {
//       "cycle": 10,
//       "releaseTime": "08:30",
//       "stopTime": "12:30",
//       "quitDay": -1,
//       "quitTime": "15:30",
//       "rule": [
//         "西院区预约号取号地点：西院区门诊楼一层大厅挂号窗口取号"
//       ]
//     },
//     "hospital": {
//       "id": "622574d336a9ba1be763dad9",
//       "createTime": "2022-03-07 10:58:27",
//       "updateTime": "2022-07-20 08:37:33",
//       "isDeleted": 0,
//       "param": {
//         "hostypeString": "三级乙等",
//         "fullAddress": "北京市市辖区西城区"
//       },
//       "hoscode": "1000_1",
//       "hosname": "中国人民解放军总医院(301医院)",
//       "hostype": "2",
//       "provinceCode": "110000",
//       "cityCode": "110100",
//       "districtCode": "110102",
//       "address": "",
//       "logoData": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsBAMAAACLU5NGAAAAJ1BMVEVHcEz////////////5+Pfv6enf2NnQxsfBtrifpKfsdXq9pKb///9KvRGrAAAADXRSTlMAQP+///////////+P5cHxpAAADQ9JREFUeAHtlU1v4lj2xvv/Ef5f4cyxoWaWs53Vlc1L984CUnTvEJhQs0OEl1oikkDNLgpga3atStIiu1FJJeXTzbnXNtjGl1Qp91Izo/skCmAb+5fnnPOcn4yMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjM6n/9ejN1L9H2jRn/73sZxWf7pajnvseyGc6fKgsacUC1vLMNJt7zux7DCtracQy56m7nyTNQyB0S9z3FZ/MpmMx36vweizBCvcMGVYldXRf5wWA3T7n3YHfR03ORcrwgo7qrDsLFWei4Hbf9nl9LWLWOhWuFGEhbPcjYkrVUfE1qc8FNfYKcYKmRIsrB1RheEoRXWxK9ZDcRHDjhqsVQFWkJSR4W8SKs6FRVhzFVisyKwwXCdmybzi+sKKsO5VYBV0llBkF3NfTmDtvCKstQosu5gqXHMnEH89RSXa6+gGGxVYbQnWP0VDWyepdrsirK0KLEkNw3DI3armMJ5yn0easFBGFa75mOVr2M19/qwJqyTF2vIifngF64ES5FIDVk2KNSrCGh5hkd6rxxrIqK5FauWxOsdu0VUD5Viyjg+izZLvrdFxb0G+QRVgFW6efQkBf34Fa4HA6B+oK8ayTvU7rbzqK1heZKqrGEuW8QtiooBA6zTWE1Exsou11WJJ8iHwAJ2W30D8eBLrM6LrN4itqharXIy1cQB/2+2eu/DLSayGc0F/r8jXlVIsSWyNACvRcyunsP5gnGr33ABsK8WSLGqqYRQNT062itmUf3Bfolcn3Q3asDaAbmJP9YRbjSRtG+noUoBVHPKLVDL8/YRb/T1tel0ox7rtR507PN46hVh7P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ZQRBx41jZyi5V5ES+d9rthZR5h3QC2PboESmuorHkRCWvAaq07e1HZxFijDU7bvLAWL+LUaatwqxSsFuXYrc5seV+/3drBygOXY4VhcEn9ToM5C8JubRtUFrCmF6pVEBVxTmSDJR1bVsJV59LeDm6VFBHcHiBDp2ExZG6PYasBFeLABmG5ruvQW8oqhw7TKfTop8X/VBqORaccoO/1GLQa9nUXHGy6PdfxFGA5PEAdsV9EJopcjFOb89Avxu/FC09cSGI3Slfx1p6z/Yb6D1rV9kjpqtahN2P9VYv+9pORkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkdEP1L8BnearyA5kQnsAAAAASUVORK5CYII=",
//       "intro": "北京协和医院是集医疗、教学、科研于一体的大型三级甲等综合医院，是国家卫生计生委指定的全国疑难重症诊治指导中心，也是最早承担高干保健和外宾医疗任务的医院之一，以学科齐全、技术力量雄厚、特色专科突出、多学科综合优势强大享誉海内外。在2010、2011、2012、2013、2014年复旦大学医院管理研究所公布的“中国最佳医院排行榜”中连续五年名列榜首。\n\n医院建成于1921年，由洛克菲勒基金会创办。建院之初，就志在“建成亚洲最好的医学中心”。90余年来，医院形成了“严谨、求精、勤奋、奉献”的协和精神和兼容并蓄的特色文化风格，创立了“三基”、“三严”的现代医学教育理念，形成了以“教授、病案、图书馆”著称的协和“三宝”，培养造就了张孝骞、林巧稚等一代医学大师和多位中国现代医学的领军人物，并向全国输送了大批的医学管理人才，创建了当今知名的10余家大型综合及专科医院。2011年在总结90年发展经验的基础上，创新性提出了“待病人如亲人，提高病人满意度；待同事如家人，提高员工幸福感”新办院理念。\n\n目前，医院共有2个院区、总建筑面积53万平方米，在职职工4000余名、两院院士5人、临床和医技科室53个、国家级重点学科20个、国家临床重点专科29个、博士点16个、硕士点29个、国家级继续医学教育基地6个、二级学科住院医师培养基地18个、三级学科专科医师培养基地15个。开放住院床位2000余张，单日最高门诊量约1.5万人次、年出院病人约8万余人次。被评为“全国文明单位”、“全国创先争优先进基层党组织”、“全国卫生系统先进集体”、“首都卫生系统文明单位”、“最受欢迎三甲医院”，荣获全国五一劳动奖章。同时，医院还承担着支援老少边穷地区、国家重要活动和突发事件主力医疗队的重任，在2008年北京奥运工作中荣获“特别贡献奖”。\n\n90多年来，协和人以执着的医志、高尚的医德、精湛的医术和严谨的学风书写了辉煌的历史，今天的协和人正为打造“国际知名、国内一流”医院的目标而继续努力。",
//       "route": "\n东院区乘车路线：106、108、110、111、116、684、685路到东单路口北；41、104快、814路到东单路口南；1、52、802路到东单路口西；20、25、37、39路到东单路口东；103、104、420、803路到新东安市场；地铁1、5号线到东单。\n西院区乘车路线：68路到辟才胡同东口；更多乘车路线详见须知。\n\n",
//       "status": 0,
//       "bookingRule": null
//     }
//   }



//请求回来的数据
// {
//     "content": [
//       {
//         "id": "622574cc36a9ba1be763dad8",
//         "createTime": "2022-03-07 10:58:20",
//         "updateTime": "2022-07-19 14:19:37",
//         "isDeleted": 0,
//         "param": {
//           "hostypeString": "三级甲等",
//           "fullAddress": "北京市市辖区西城区大望路"
//         },
//         "hoscode": "1000_0",
//         "hosname": "北京协和医院",
//         "hostype": "1",
//         "provinceCode": "110000",
//         "cityCode": "110100",
//         "districtCode": "110102",
//         "address": "大望路",
//         "logoData": "",
//         "intro": "",
//         "route": "东院区乘车路线：106、108、110、111、116、684、685路到东单路口北；41、104快、814路到东单路口南；1、52、802路到东单路口  
//         "status": 0,
//         "bookingRule": {
//           "cycle": 10,
//           "releaseTime": "08:30",
//           "stopTime": "11:30",
//           "quitDay": -1,
//           "quitTime": "15:30",
//           "rule": [
//             "西院区预约号取号地点：西院区门诊楼一层大厅挂号窗口取号",
//             "东院区预约号取号地点：东院区老门诊楼一层大厅挂号窗口或新门诊楼各楼层挂号/收费窗口取号"
//           ]
//         }
//       }
//     ],
//     "pageable": {
//       "sort": {
//         "sorted": true,
//         "unsorted": false,
//         "empty": false
//       },
//       "pageNumber": 0,
//       "pageSize": 1,
//       "offset": 0,
//       "paged": true,
//       "unpaged": false
//     },
//     "totalElements": 20,
//     "totalPages": 20,
//     "last": false,
//     "first": true,
//     "sort": {
//       "sorted": true,
//       "unsorted": false,
//       "empty": false
//     },
//     "numberOfElements": 1,
//     "size": 1,
//     "number": 0,
//     "empty": false